package homework_05;

import java.util.Scanner;

public class Home_02 {
    public static boolean isRunNian(int x){
        boolean flag = false;
        if(x%4==0){
            if(x%100==0){
                if(x%400==0){
                    flag =true;
                }
            }else{
                flag = true;
            }
        }
        return flag;
    }

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int x=input.nextInt();
        boolean y=isRunNian(x);
        System.out.println(y);
    }
}
